package com.fashion.model.brand;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fashion.model.NewsColumn;



@Entity
@Table(name="FASHION.Brand")
public class Brand {
	@Id 
	@Column(name="ID", updatable=false)
	private String id;
	@Column(name="CN_TITLE")
	private String cnTitle;
	@Column(name="EN_TITLE")
	private String enTitle;
	@Column(name="LOGO")
	private String logo;
	@Column(name="INTRODUCTION")
	private String introduction;
	@Column(name="ADDITIONAL_TEXT")
	private String additionalText;
	@Column(name="PRIORITY")
	private int priority = 0;
	@Column(name="FOUNDER")
	private String founder;
	@Column(name="WEBSITE")
	private String website;
	@Column(name="BIRTHLAND")
	private String birthland;
	@Column(name="COMPANY")
	private String company;
	@Column(name="PRODUCT")
	private String product;
	@Column(name="FIGURE_IMAGE")
	private String figureImage = null;
	@ManyToOne(targetEntity=NewsColumn.class)
	@JoinColumn(name="DISTRICT")
	private NewsColumn district;
	@Column(name="META_DESCRIPTION")
	private String metaDescription;
	@ManyToMany(fetch=FetchType.LAZY,targetEntity=NewsColumn.class,  
            cascade={CascadeType.MERGE,CascadeType.PERSIST}       
			)
	@JoinTable(name="BRAND_COLUMN_ITEM",  
            joinColumns={@JoinColumn(name="BRAND_ID")},  
            inverseJoinColumns={@JoinColumn(name="COLUMN_ID")})
	private List<NewsColumn> industries;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCnTitle() {
		return cnTitle;
	}
	public void setCnTitle(String cnTitle) {
		this.cnTitle = cnTitle;
	}
	public String getEnTitle() {
		return enTitle;
	}
	public void setEnTitle(String enTitle) {
		this.enTitle = enTitle;
	}
	public String getLogo() {
		return logo;
	}
	public void setLogo(String logo) {
		this.logo = logo;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public int getPriority() {
		return priority;
	}
	public void setPriority(int priority) {
		this.priority = priority;
	}
	public String getFounder() {
		return founder;
	}
	public void setFounder(String founder) {
		this.founder = founder;
	}
	public String getWebsite() {
		return website;
	}
	public void setWebsite(String website) {
		this.website = website;
	}
	public String getBirthland() {
		return birthland;
	}
	public void setBirthland(String birthLand) {
		this.birthland = birthLand;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getProduct() {
		return product;
	}
	public void setProduct(String product) {
		this.product = product;
	}
	public String getAdditionalText() {
		return additionalText;
	}
	public void setAdditionalText(String additionalText) {
		this.additionalText = additionalText;
	}
	public String getFigureImage() {
		return figureImage;
	}
	public void setFigureImage(String figureImage) {
		this.figureImage = figureImage;
	}
	public NewsColumn getDistrict() {
		return district;
	}
	public void setDistrict(NewsColumn district) {
		this.district = district;
	}
	public String getMetaDescription() {
		return metaDescription;
	}
	public void setMetaDescription(String metaDescription) {
		this.metaDescription = metaDescription;
	}
	public List<NewsColumn> getIndustries() {
		return industries;
	}
	public void setIndustries(List<NewsColumn> industries) {
		this.industries = industries;
	}
	
	
}
